<template>
  <view>
    <text>商品详情页</text>
    <button @click="routerTo('/pagesA/test3/index')">套一层路由测试</button>
    <button @click="routerTo({ url: '/pagesA/test2/index', needLogin: true, modal: true })">购买--需要token-弹窗</button>
    <button @click="routerTo({ url: '/pagesA/test2/index', needLogin: true, modal: false })">购买--需要token--不弹框</button>
    <button @click="hasLogin(true)">校验当前页面的登录状态</button>
    <button @click="routerBack()">返回</button>
  </view>
</template>

<script>
import { routerTo, routerBack, hasLogin } from '@/utils/router.js'
export default {
  name: 'Test',
  methods: {
    routerTo,
    routerBack,
    hasLogin
  },
}
</script>

<style lang="scss" scoped>
</style>